<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误 - 低位龙头股分析系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        .header {
            background-color: #343a40;
            color: white;
            padding: 2rem 0;
            margin-bottom: 2rem;
        }
    </style>
</head>

<body>
    <div class="header">
        <div class="container">
            <h1>发生错误</h1>
            <p>很抱歉，操作过程中发生了错误</p>
        </div>
    </div>

    <div class="container">
        <div class="row mb-4">
            <div class="col-12">
                <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
                    <div class="container-fluid">
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                            data-bs-target="#navbarNav">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarNav">
                            <ul class="navbar-nav">
                                <li class="nav-item">
                                    <a class="nav-link" href="/">首页</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="/results">历史结果</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="/backtesting">回测系统</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </nav>
            </div>
        </div>

        <div class="row mb-4">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-header bg-danger text-white">
                        <h5 class="mb-0"><i class="bi bi-exclamation-triangle"></i> 错误信息</h5>
                    </div>
                    <div class="card-body">
                        <div class="alert alert-danger">
                            <p>{{ error_message }}</p>
                        </div>
                        <div class="mt-3">
                            <a href="javascript:history.back()" class="btn btn-outline-primary">
                                <i class="bi bi-arrow-left"></i> 返回上一页
                            </a>
                            <a href="/" class="btn btn-primary">
                                <i class="bi bi-house"></i> 返回首页
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
</body>

</html>